/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sdc.utility;


/**
 *
 * @author yokoe
 */
public class EWMAcalculator {

	static final double ALPHA = PropertyManager.getValueAsDouble("Alpha");
        //static final double ALPHA = 0.50;

	public static double calculateCurrentEWMA(double currentMeasured, double lastEMA)
	{
		return ALPHA * currentMeasured + ( 1.0 - ALPHA ) * lastEMA;
	}

}
